const http = require("http");
const fs = require("fs");

const web = http.createServer((req,res)=>{
    let url = req.url;
    if(url === "/"){
        url = "/index.html"
    }else if(url === "/favicon.ico"){
        return;
    }
    let str = fs.readFileSync(__dirname+url);
    res.end(str);
})

web.listen(3737,()=>{
    console.log("3737已开启");
})